/////////////////////////////////////////////////////////////
// File Name	:	"CEvent.H"
//
// Author Name	:	Brandon Layton (BL)
//
// Purpose:		:	Events that can be triggered immediately or through
//					various cues in game
/////////////////////////////////////////////////////////////

#pragma once

#include <string>
using std::string;

typedef string EVENTID;		//	could be an int or enum, just used strings to change it
							//	up.

enum EventType {event_normal, event_timed, event_crossed};
class CEvent
{
private:
	EVENTID			m_EventID;	  //	The event's id type.
	void*			m_pParam;	  //	Store any variable type (but only one)
	float			m_fThreshold; //	depending on the type, threshold either counts down or is a value that target needs to cross
	unsigned int	m_uiTarget;	  //	The id of the CBase that the event will be sent to
	unsigned int	m_uiActor;	  //	The id of the CBase that triggers the event
	EventType		m_nEventType; //	Event Type
	
public:
	CEvent(EVENTID eventID, float fCountdown = 0.0f, void* pParam = NULL, unsigned int uiActor = 0, unsigned int uiTarget = 0);

	~CEvent() {}

	//  Mutators:
	inline void		SetThreshold(float threshold) { m_fThreshold = threshold; }
	inline void		SetParam(void * param)	{ m_pParam = param; }

	//	Accessors:
	inline EVENTID  GetEventID(void)	{	return m_EventID; }
	inline void*	GetParam(void)		{	return m_pParam; }
	inline float	GetThreshold()		{	return m_fThreshold; }
	inline EventType GetEventType()		{	return m_nEventType; }
	inline unsigned int	GetTarget()		{	return m_uiTarget; }
	inline unsigned int GetActor()		{	return m_uiActor; }
};